package com.ciwong.epaper.modules.msg.dao;

import com.ciwong.mobilelib.utils.EAction;

/**
 * Created by res-yinxue on 2016/6/20.
 */
public class MsgAction extends EAction {


    /**
     * 获取未读消息数量
     * MyWorkFragment
     */
    public static final String ACTION_GET_NOREAD_MSGCOUNT = HOST+"/v5/message/getNoReadMsgCount";

    /**
     * 按发送者获取消息分组列表
     * MyMessageActivity
     */
    public static final String ACTION_GET_MSG = HOST+"/v5/message/getMsgList";

    /**
     * 根据发送者ID获取该分组下的消息列表
     * WorkMessageActivity
     */
//    public static final String ACTION_GET_MSG_BY_SENDERID = HOST+"/v5/message/getMsgsBymsgType";

    public static final String ACTION_GET_MSG_BY_SENDERID = HOST+"/v5/message/getUserNoticeByGroup";
    /**
     * 是否已撤回该作业
     */
    public static final String ACTION_ISDELWORK = HOST+"/v1/studentWork/isDelWork";


    /**
     * 设置第三方推送的注册ID
     */
    public static final String ACTION_GET_MSG_PUSHID = HOST+"/v5/service/setuserpushId";

    /**
     * 设置消息状态
     */
    public static final String ACTION_GET_MSG_SETREAD =HOST+ "/v5/message/setRead";
    public static final String ACTION_GET_MSG_SETALLREAD =HOST+ "/v5/message/setReadByType";

    /**
     * 根据作业ID获取作业详情
     * WorkDetailActivity
     */
    public static final String ACTION_GET_MSG_WORKDETAIL =HOST+ "/v5/epaperwork/getUserWorkDetail";

    /**
     * 根据doWorkId获取作业内容
     */
    public static final String ACTION_GET_DO_WORK_INFO = HOST+"/v5/epaperwork/getDoWorkInfo";


    public static final String ACTION_GET_NOREAD_MSGCOUNT_NEW = HOST+"/v5/message/getNewMessageCount";
    public static final String ACTION_GET_MSG_NEW             = HOST+"/v5/message/getNewMessageListCount";
    @Override
    public String getActionUrl(String s) {
        if (s.equals(ACTION_GET_MSG_BY_SENDERID)) {
            return ACTION_GET_MSG_BY_SENDERID;
        } else if (s.equals(ACTION_GET_MSG)) {
            return ACTION_GET_MSG;
        } else if (s.equals(ACTION_GET_NOREAD_MSGCOUNT)) {
            return ACTION_GET_NOREAD_MSGCOUNT;
        } else if (s.equals(ACTION_GET_MSG_PUSHID)) {
            return ACTION_GET_MSG_PUSHID;
        } else if (s.equals(ACTION_GET_MSG_SETREAD)) {
            return ACTION_GET_MSG_SETREAD;
        } else if (s.equals(ACTION_GET_MSG_WORKDETAIL)) {
            return ACTION_GET_MSG_WORKDETAIL;
        } else if (s.equals(ACTION_GET_DO_WORK_INFO)) {
            return ACTION_GET_DO_WORK_INFO;
        }else if(s.equals(ACTION_GET_MSG_SETALLREAD)){
            return ACTION_GET_MSG_SETALLREAD;
        }else if(s.equals(ACTION_ISDELWORK)){
            return ACTION_ISDELWORK;
        } else if(s.equals(ACTION_GET_NOREAD_MSGCOUNT_NEW)){
            return ACTION_GET_NOREAD_MSGCOUNT_NEW;
        }else if(s.equals(ACTION_GET_MSG_NEW)){
            return ACTION_GET_MSG_NEW;
        }
        return super.getActionUrl(s);
    }
}
